﻿<Window x:Class="AppMVVM.Views.FeedReader"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:viewModels="clr-namespace:AppMVVM.ViewModels"
        xmlns:views="clr-namespace:AppMVVM.Views"
        Title="FeedReader" Height="300" Width="600">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>

        <TreeView Margin="5" Grid.Column="0" ItemsSource="{Binding AllCategories}" SelectedItemChanged="TreeView_SelectedItemChanged">
            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Sources}">
                    <TextBlock Text="{Binding Name}"/>
                    <HierarchicalDataTemplate.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}"/>
                        </DataTemplate>
                    </HierarchicalDataTemplate.ItemTemplate>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>
        
        <GridSplitter Grid.Column="1" Width="2" 
                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

        <GroupBox x:Name="container" Grid.Column="2" Margin="5"/>
    </Grid>
</Window>
